
local string_utils = require("mvc.utils.string_utils");
local Cookie = require("mvc.cookie");

local cookie = Cookie:new();

cookie:set_domain(".test.com");
cookie:set_path("/");
cookie:set_name("test_name");
cookie:set_value("1234556");
cookie:set_max_age("1800");

ngx.say(cookie:to_cookie_string());
ngx.say(cookie:get_domain());
ngx.say(cookie:to_string());

for i=1, 5 do  
 ngx.say(tostring(math.random(10)));
end  
ngx.say(os.time());
ngx.say(os.clock());
ngx.say(string_utils.rand(32));